//
//  CSPhotoTableViewController.m
//  classroom
//
//  Created by Macx on 16/7/30.
//  Copyright © 2016年 LiuZhuo. All rights reserved.
//

#import "CSPhotoTableViewController.h"

@interface CSPhotoTableViewController ()

@end

@implementation CSPhotoTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupGroup0];
    [self setupGroup1];
    [self setupGroup2];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)setupGroup0
{
    // 1.创建第一组数据
    LZAccess *erya = [LZAccess itemWithTitle:@"尔雅楼"];
    LZAccess *yunhui = [LZAccess itemWithTitle:@"耘慧楼"];
    LZAccess *jingyuan = [LZAccess itemWithTitle:@"静远楼"];
    LZSection *group0 = [[LZSection alloc]init];
    group0.headerLabel=@"葫芦岛校区教学楼平面图";
    group0.items = @[erya, yunhui,jingyuan];
    for (int i = 0; i<group0.items.count; i++) {
        LZAccess * item = group0.items[i];
        item.nibName= @"CSImageTableViewController";
    }
    [self.dataArray addObject:group0];
    
}

- (void)setupGroup1
{
    // 1.创建第二组数据
    LZAccess *boya = [LZAccess itemWithTitle:@"博雅楼"];
    LZAccess *zhixing = [LZAccess itemWithTitle:@"知行楼"];
    LZAccess *zhiyuan = [LZAccess itemWithTitle:@"致远楼"];
    LZAccess *zhonghe = [LZAccess itemWithTitle:@"中和楼"];
    LZAccess *xinhua = [LZAccess itemWithTitle:@"新华楼"];
    LZSection *group1 = [[LZSection alloc]init];
    group1.headerLabel=@"阜新主校区教学楼平面图";
    group1.items = @[boya, zhixing,zhiyuan,zhonghe,xinhua];
    for (int i = 0; i<group1.items.count; i++) {
        LZAccess * item = group1.items[i];
        item.block=^{
            [SVProgressHUD showErrorWithStatus:@"正在绘制中"];
            
            [self performSelector:@selector(diss) withObject:nil afterDelay:1];
        };
    }
    [self.dataArray addObject:group1];
    
}
- (void)setupGroup2
{
    // 1.创建第三组数据
    LZAccess *yulong = [LZAccess itemWithTitle:@"育龙主楼"];
    LZAccess *yulongshiyan = [LZAccess itemWithTitle:@"育龙实验楼"];
    LZSection *group2 = [[LZSection alloc]init];
    group2.headerLabel=@"阜新北校区教学楼平面图";
    group2.items = @[yulong, yulongshiyan];
    for (int i = 0; i<group2.items.count; i++) {
        LZAccess * item = group2.items[i];
        item.block=^{
           [ SVProgressHUD showErrorWithStatus:@"正在绘制中"];
           
            [self performSelector:@selector(diss) withObject:nil afterDelay:1];
            
            
        };
    }
    [self.dataArray addObject:group2];
    
}

-(void)diss{
    [SVProgressHUD dismiss];
}
@end
